﻿



using System; 
using System.Collections;
using System.Collections.Generic ;
using System.Runtime.Serialization;

namespace ufida.u9.ait.openapi
{
	/// <summary>
	/// 数量 Copy DTO :REST自定义的数据传输类型 
	/// 
	/// </summary>
	[DataContract(Namespace = "ufida.u9.ait.openapi")]
	[Serializable]
	public partial class CopyOfQuantityData  
	{
		/// <summary>
		/// Default Constructor
		/// </summary>
		public CopyOfQuantityData()
		{
			initData();
		}
		private void initData()
		{
					Amount=0m; 
		
					RateToBase=0m; 
		

			//调用默认值初始化服务进行配置方式初始化
			UFSoft.UBF.Service.DTOService.InitConfigDefault(this);
		}
		[System.Runtime.Serialization.OnDeserializing]
		internal void OnDeserializing(System.Runtime.Serialization.StreamingContext context)
		{
			 initData();
		}
		#region Do SerializeKey -ForDTODataType
		//只为处理集合型EntityKey。原因集合型EntityKey由于使用臫的集合对象，无法实现数据共享.-UBF专用.
		public void DoSerializeKeyList(IDictionary dict)
		{
			if (dict == null ) dict = new Hashtable() ;
			if (dict[this] != null)
				return ;
			dict[this] = this;
	        	        	        	        
		}
		#endregion 
		/// <summary>
		/// Constructor Full Argument
		/// </summary>
		public CopyOfQuantityData(  System.Decimal amount  , Int64 uOMKey  , System.Decimal rateToBase  , Int64 variableBaseUOMKey  )
		{
			initData();
			this.Amount = amount;
			this.UOMKey = uOMKey;
			this.RateToBase = rateToBase;
			this.VariableBaseUOMKey = variableBaseUOMKey;
		}
		#region System Fields 
		//--系统字段,目前没有.EntityData上有相应的字段,用于保存相关的实体状态信息,DTO上没有状态信息.	
		#endregion
		
		#region DTO Properties 
	
		

		/// <summary>
		/// 数值
		/// 数量 Copy.Misc.数值
		/// </summary>
		private System.Decimal m_amount ;
		[DataMember(IsRequired=false)]
		public System.Decimal Amount
		{
			get	
			{	
				return m_amount ;
			}
			set	
			{	
				m_amount = value ;	
			}
		}
			
		private UFSoft.UBF.Business.BusinessEntity.EntityKey m_uOMKey_SKey ;
		/// <summary>
		/// 单位 序列化Key属性。（传递跨组织序列列字段）
		/// 数量 Copy.Misc.单位
		/// </summary>
		[DataMember(IsRequired=false)]
		public UFSoft.UBF.Business.BusinessEntity.EntityKey UOMKey_SKey
		{
			get 
			{
				return m_uOMKey_SKey ;					
			}
			set
			{
				m_uOMKey_SKey =value;	
			}
		}


		/// <summary>
		/// 单位
		/// 数量 Copy.Misc.单位
		/// </summary>
		[DataMember(IsRequired=false)]
		public Int64 UOMKey
		{
			get	
			{	
				if (UOMKey_SKey == null)
					return UFSoft.UBF.Business.Entity.EmptyObjectValue ;
				else
					return UOMKey_SKey.ID ;
			}
			set	
			{	
				if (value == 0 || value == UFSoft.UBF.Business.Entity.EmptyObjectValue )
					UOMKey_SKey = null ;
				else
				{
					if (UOMKey_SKey == null )
						UOMKey_SKey = new UFSoft.UBF.Business.BusinessEntity.EntityKey(value,"UFIDA.U9.Base.UOM.UOM") ;
					else
						UOMKey_SKey.ID = value ;
				}
			}
		}
			
		

		/// <summary>
		/// 浮动转换率
		/// 数量 Copy.Misc.浮动转换率
		/// </summary>
		private System.Decimal m_rateToBase ;
		[DataMember(IsRequired=false)]
		public System.Decimal RateToBase
		{
			get	
			{	
				return m_rateToBase ;
			}
			set	
			{	
				m_rateToBase = value ;	
			}
		}
			
		private UFSoft.UBF.Business.BusinessEntity.EntityKey m_variableBaseUOMKey_SKey ;
		/// <summary>
		/// 可变基础计量单位 序列化Key属性。（传递跨组织序列列字段）
		/// 数量 Copy.Misc.可变基础计量单位
		/// </summary>
		[DataMember(IsRequired=false)]
		public UFSoft.UBF.Business.BusinessEntity.EntityKey VariableBaseUOMKey_SKey
		{
			get 
			{
				return m_variableBaseUOMKey_SKey ;					
			}
			set
			{
				m_variableBaseUOMKey_SKey =value;	
			}
		}


		/// <summary>
		/// 可变基础计量单位
		/// 数量 Copy.Misc.可变基础计量单位
		/// </summary>
		[DataMember(IsRequired=false)]
		public Int64 VariableBaseUOMKey
		{
			get	
			{	
				if (VariableBaseUOMKey_SKey == null)
					return UFSoft.UBF.Business.Entity.EmptyObjectValue ;
				else
					return VariableBaseUOMKey_SKey.ID ;
			}
			set	
			{	
				if (value == 0 || value == UFSoft.UBF.Business.Entity.EmptyObjectValue )
					VariableBaseUOMKey_SKey = null ;
				else
				{
					if (VariableBaseUOMKey_SKey == null )
						VariableBaseUOMKey_SKey = new UFSoft.UBF.Business.BusinessEntity.EntityKey(value,"UFIDA.U9.Base.UOM.UOM") ;
					else
						VariableBaseUOMKey_SKey.ID = value ;
				}
			}
		}
			
		#endregion	

		#region Multi_Fields
								
		#endregion 
	} 	
}
